#include <iostream>  
using namespace std;  
  
// 定义一个递归函数，用于求解汉诺塔问题  
void hanoi(int n, char from_rod, char to_rod, char aux_rod) {  
    if (n == 1)
        cout << "Move disk 1 from rod " << from_rod << " to rod " << to_rod << endl;  
    else
        hanoi(n - 1, from_rod, aux_rod, to_rod);
        cout << "Move disk " << n << " from rod " << from_rod << " to rod " << to_rod << endl;
        hanoi(n - 1, aux_rod, to_rod, from_rod);
}  

int main()
{
    int n;
    cout << "Enter the number of disks: ";  
    cin >> n;    // 调用递归函数求解汉诺塔问题，其中A表示源杆，C表示目标杆，B表示辅助杆  
    return 0;  
}